package Administrator.AdministratorMainFrame.AdministratorMainFrameView.ConfigureContestPane.ConfigureProblemsFrame;

import java.awt.EventQueue;
import javax.swing.JButton;
import javax.swing.JFormattedTextField;

import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JRadioButton;
import javax.swing.UIManager;

public class AddProblemsFrame 
{
	private JFormattedTextField formattedTextField_1;
	private JFormattedTextField formattedTextField;
	private JFormattedTextField memoryLimitFormattedTextField;
	private JFormattedTextField runtimeLimitformattedTextField;
	private JFormattedTextField problemTitleFormattedTextField;
	private JFrame frame;

	/**
	 * Launch the application
	 * @param args
	 */
	public static void main(String args[]) 
	{
		try
		{
		    UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
		}
		catch(Exception e)
		{
			e.printStackTrace();
		}
		
		EventQueue.invokeLater(new Runnable() {
			public void run() {
				try {
					AddProblemsFrame window = new AddProblemsFrame();
					window.frame.setVisible(true);
				} catch (Exception e) {
					e.printStackTrace();
				}
			}
		});
	}

	/**
	 * Create the application
	 */
	public AddProblemsFrame() 
	{
		try
		{
		    UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
		}
		catch(Exception e)
		{
			e.printStackTrace();
		}
		
		createContents();
	}

	/**
	 * Initialize the contents of the frame
	 */
	private void createContents() 
	{
		frame = new JFrame();
		frame.setTitle("Add new Problem");
		frame.getContentPane().setLayout(null);
		frame.setBounds(100, 100, 476, 444);
		frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);

		final JLabel problemTitleLabel = new JLabel();
		problemTitleLabel.setText("Problem Title");
		problemTitleLabel.setBounds(26, 43, 117, 15);
		frame.getContentPane().add(problemTitleLabel);

		problemTitleFormattedTextField = new JFormattedTextField();
		problemTitleFormattedTextField.setBounds(158, 40, 235, 21);
		frame.getContentPane().add(problemTitleFormattedTextField);

		final JLabel runtimeLabel = new JLabel();
		runtimeLabel.setText("RunTime Limit(ms)");
		runtimeLabel.setBounds(26, 90, 111, 15);
		frame.getContentPane().add(runtimeLabel);

		runtimeLimitformattedTextField = new JFormattedTextField();
		runtimeLimitformattedTextField.setBounds(158, 87, 235, 21);
		frame.getContentPane().add(runtimeLimitformattedTextField);

		final JLabel memoryLimitLabel = new JLabel();
		memoryLimitLabel.setText("Memory Limit(MB)");
		memoryLimitLabel.setBounds(26, 133, 111, 15);
		frame.getContentPane().add(memoryLimitLabel);

		memoryLimitFormattedTextField = new JFormattedTextField();
		memoryLimitFormattedTextField.setBounds(157, 130, 236, 21);
		frame.getContentPane().add(memoryLimitFormattedTextField);

		formattedTextField = new JFormattedTextField();
		formattedTextField.setBounds(69, 245, 235, 21);
		frame.getContentPane().add(formattedTextField);

		final JRadioButton problemRadioButton = new JRadioButton();
		problemRadioButton.setText("Problem has input data");
		problemRadioButton.setBounds(22, 173, 157, 23);
		frame.getContentPane().add(problemRadioButton);

		final JLabel inputFileLabel = new JLabel();
		inputFileLabel.setText("Input File Path");
		inputFileLabel.setBounds(69, 216, 90, 15);
		frame.getContentPane().add(inputFileLabel);

		final JButton selectButton = new JButton();
		selectButton.setText("Select");
		selectButton.setBounds(325, 244, 68, 23);
		frame.getContentPane().add(selectButton);

		final JLabel answerFileLabel = new JLabel();
		answerFileLabel.setText("Answer File");
		answerFileLabel.setBounds(26, 302, 111, 15);
		frame.getContentPane().add(answerFileLabel);

		formattedTextField_1 = new JFormattedTextField();
		formattedTextField_1.setBounds(68, 327, 236, 21);
		frame.getContentPane().add(formattedTextField_1);

		final JButton addButton = new JButton();
		addButton.setText("Add");
		addButton.setBounds(107, 379, 70, 23);
		frame.getContentPane().add(addButton);

		final JButton exitButton = new JButton();
		exitButton.setText("Exit");
		exitButton.setBounds(232, 379, 70, 23);
		frame.getContentPane().add(exitButton);

		final JButton selectButton_1 = new JButton();
		selectButton_1.setText("Select");
		selectButton_1.setBounds(325, 326, 68, 23);
		frame.getContentPane().add(selectButton_1);
	}
}
